<?php
$this->breadcrumbs=array(
	'试卷管理'=>array('admin'),
	'管理列表',
);

$this->menu=array(
	array('label'=>'新增', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('tests-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->
<h1>点击试卷标题进入试卷试题管理</h1>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'tests-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'name'=>'tests_name',
			'type'=>'raw',
			'value'=>'CHtml::link(CHtml::encode($data->tests_name), array("/Tests/subjects","testId"=>"$data->tests_id"))'
		),
		'tests_score',
		array('name'=>'tests_memo','type'=>'html','filter'=>false),
		/*
		'tests_edit_time',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
